package cn.ggcms.cms.dao.impl;

import java.util.List;

import cn.ggcms.cms.dao.SoftMirrorDao;
import cn.ggcms.cms.utils.SimpleDao;
import cn.ggcms.cms.vo.SoftMirror;

public class SoftMirrorImpl extends SimpleDao<SoftMirror> implements SoftMirrorDao {

	public boolean doInsertSoftMirror(SoftMirror SoftMirror) {
		boolean flag = false;
		try {
			 super.save(SoftMirror);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
	}
	public SoftMirror findSoftMirror(SoftMirror SoftMirror) {
	
		return null;
	}
	public SoftMirror finSoftMirrorById(int id) {
		return (SoftMirror) super.find(SoftMirror.class,id);
	}
	public List<SoftMirror> finSoftMirrors() {

		return super.find(SoftMirror.class);
	}
	public boolean doDeleteSoftMirrorById(int id) {
		boolean flag = false;
		try {
			super.delete(SoftMirror.class, id);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
		
		
	}
	public boolean doUpdateSoftMirror(SoftMirror softMirror) {
		boolean flag = false;
		try {
			super.update(softMirror);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return flag;
	}

}
